import time


def string_to_timestamp(t, format_string="%Y-%m-%d %H:%M:%S"):
    return time.mktime(time.strptime(t, format_string))


def timestamp_to_string(t, format_string="%Y-%m-%d %H:%M:%S"):
    return time.strftime(format_string, time.localtime(t))
